﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASPSnippets.FaceBookAPI;

namespace Fabrikatorum.Fabrikator.Sayfa
{
    public partial class UyeCikis : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            FaceBookConnect.API_Key = "206720549535952";
            FaceBookConnect.API_Secret = "5cc292c709f704afca8607ddd2921ec1";
            if (Request.QueryString["logout"] == "true")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Sistemden çıkış yaptınız')", true);
                return;
            }
            Session.Remove("uye");
            Session.Abandon();
            Session.Clear();
            string codene = string.Empty;
            codene = (string)Session["code"];
            //      Response.Redirect("http://kimzeki.com/v2/Uyelik.aspx?code="+ (string)Session["code"]);
            Session.Remove("code");
            Session.Abandon();
            Session.Clear();
            if (Request.Cookies["aytacfabrikatorum"] != null)
            {
                Response.Cookies["aytacfabrikatorum"].Expires = DateTime.Now.AddDays(-1);//Cookie'yi expire edip siliyoruz.
            }
            Response.Redirect("~/Fabrikator/Sayfa/Giris.aspx?code=" + codene);
        }
    }
}